<?php include("includes/session.php"); ?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php echo $lang['PAGE_TITLE_CONFIRM']; ?></title>
<?php include("header.php"); ?>
	<br /><br />
	<center>
	<table cellpadding="0" cellspacing="0" width="60%" class="border">
	<tr>
		<td align="left">
			<?php 
			if(isset($_GET['user']) && isset($_GET['id']) && $database->verifyUser($_GET['user'],$_GET['id']))
			{
				echo "<center><h2>Verification Complete</h2></center><br />";
				echo "<center><b>".$_GET['user']."</b>, you can now <a href=\"index.php\">Log In</a>.</center>";
			}
			else
			{
				$userData = $database->getUserInfo($_GET['user']);
				if($userData['userlevel']>0)
				{
					echo "<center><h2>Account Already Confirmed</h2></center><br />";
					echo "<center><b>".$_GET['user']."</b>, you can now <a href=\"index.php\">Log In</a>.</center>";
				}
				else
				{
					echo "<center><h2>Verification Failed</h2></center><br />";
					echo "<center>Please try again later.</center>";
				}
			}
			?>
			<br />
		</td>
	</tr>
	</table>
	</center>
<?php include("footer.php"); ?>